package com.ad.platform.api;

import com.ad.payload.vo.PfAdvertisementVo;
import com.ad.platform.service.IPfAdvertisementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/pfAdvertisementApi")
public class PfAdvertisementApi {

    @Autowired
    private IPfAdvertisementService iPfAdvertisementService;

    /**
     * 随机查询 8条未过期广告信息 (小程序首页展示)
     * @param
     * @return
     */
    @PostMapping("/client/noAuth/randomListPfAdvertisement")
    public List<PfAdvertisementVo> randomListPfAdvertisement(){
        List<PfAdvertisementVo> pfAdvertisementVoList =
                iPfAdvertisementService.randomListPfAdvertisement();
        return pfAdvertisementVoList;

    }

}
